package com.estock.platform.task.support;

import org.apache.log4j.Logger;

import com.estock.common.model.security.Stock;
import com.estock.platform.http.YahooCsvConn;

public class YahooCsvDownload implements Runnable {
	
	private static Logger logger = Logger.getLogger(YahooCsvDownload.class);

	private Stock stock;
	public YahooCsvDownload(Stock stock) {
		this.stock = stock;
	}

	@Override
	public void run() {
		try {
			logger.info("begin downloading stock daily trans data with code=" + stock.getCode());
//			System.out.println("begin downloading stock daily trans data with code=" + stock.getCode());
			new YahooCsvConn().download(stock);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
